package com.it.io;

public class IntArrayIOSequence extends AbstractIOSequence<int[], Integer> {

	
	@Override
	public void initInput(int[] input) {
		this.input = input;
	}

	@Override
	public boolean hasInput() {
		return inputIndex < input.length;
	}

	@Override
	public Integer input() {
		return input[inputIndex++];
	}

	@Override
	public void initOutput(int size) {
		output = new int[size];
	}

	@Override
	public void output(Integer e) {
		output[outputIndex++] = e;
	}

	@Override
	public int[] finish() {
		return output;
	}

}